﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using 聚欣订单分析.PublicClass;

namespace 聚欣订单分析
{
    public partial class hktj : System.Web.UI.Page
    {
        PLSQLClass PL = new PLSQLClass();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 回款提交审核
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnUpload_Click(object sender, EventArgs e)
        {

            List<object> keyValues = this.ASPxGridView1.GetSelectedFieldValues("ID");
            string strSQL = @"insert into tbl_HKSH VALUES('" + keyValues[0].ToString() + "','" + deHKRQ.Text + "','" + seHKJE.Value.ToString() + "','" + rbHKBS.SelectedItem.Value.ToString() + "','" + ASPxMemo1.Text.Trim() + "',0)";
            string strDDBSql =
                     @"update tbl_DDB set 状态='回款待审' where ID=" + keyValues[0].ToString();
            PL.ExecuteSqlWithGoUseTran(strSQL + "go" + strDDBSql);
            JsHelper.AlertAndRedirect("提交成功", "hktj.aspx");
        }

        protected void btnExcel_Click(object sender, EventArgs e)
        {
            ASPxGridViewExporter1.WriteXlsxToResponse("待回款");
        }

    }
}
